
let proxyObj = {}

proxyObj["/"] = {
	//websocket
	ws: false,
	//需要跨域的地址
	target: process.env["VUE_APP_API_URL "],
	//发送请求头host会被设置target
	changeOrigin: true,
	//不重写请求地址
	pathReWrite: {
		"^/": "/",
	},
}

module.exports = {
	configureWebpack: {
		module: {
			rules: [
				{
					test: /\.mjs$/,
					include: /node_modules/,
					type: "javascript/auto",
				},
			],
		},
	},
	devServer: {
		host: "localhost",
		port: 8080,
		proxy: proxyObj,
		// disableHostCheck: true,
		// open: true,
		// https: false,
		// changeOrigin: true
	},
}
